package com.the4man.cnbdw.service.impl;

import com.the4man.cnbdw.dao.RoomMapper;
import com.the4man.cnbdw.service.AbstractService;
import com.the4man.cnbdw.service.RoomService;
import com.the4man.framework.model.Room;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by lenovo on 2017/12/12.
 */
@Service("roomService")
public class RoomServiceImpl extends AbstractService<Room> implements RoomService {
    @Autowired
    private RoomMapper roomMapper;

    public RoomServiceImpl() {
    }

    public String selectByName(String roomNo) {
        return this.roomMapper.selectByName(roomNo);
    }

    public String selectMByName(String id, String name) {
        return this.roomMapper.selectMByName(id, name);
    }

    public String selectNameById(String roomId) {
        return this.roomMapper.selectNameById(roomId);
    }

    public void updateRoomLocked(String doorNo, String lock) {
        this.roomMapper.updateRoomLocked(doorNo, lock);
    }
}
